package com.eci.example.webapi.exception;

import com.eci.common.asset.algorithm.SnowFlake;
import com.eci.common.asset.core.R;
import com.eci.context.context.exception.BusinessException;
import com.eci.context.util.BeanUtil;
import com.eci.example.constant.ExampleErrorCode;
import com.eci.example.domain.entity.Example;
import com.eci.example.domain.repository.ExampleRepository;
import com.eci.example.feign.ExceptionFeign;
import com.eci.example.vo.ExampleReq;
import com.eci.example.vo.ExampleRsp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("except")
@Api(tags = "基础配置/定时任务")
@Slf4j
public class ExceptionController implements ExceptionFeign {

    @PostMapping("add")
    @ApiOperation(value = "分页列表", notes = "固定按顺序号排序,不支持自定义排序功能")
    @Override
    public R<ExampleRsp> add(ExampleReq req) {
        throw new BusinessException(ExampleErrorCode.VALUE_NOT_NULL);
    }

}
